package com.redrose.camera.login;

import android.content.Intent;
import android.view.View;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.redrose.camera.main.MainActivity;

public class LoginViewModel extends ViewModel {
    private MutableLiveData<String> mLoginResultLiveData;

    public LoginViewModel() {
        mLoginResultLiveData = new MutableLiveData<>();
    }

    public void handlerLoginClick(View view) {
        mLoginResultLiveData.setValue("登陆");
    }

    public MutableLiveData<String> getLoginResultLiveData(){
        return mLoginResultLiveData;
    }

    public void openMainActivity(LoginActivity activity) {
        Intent intent = new Intent(activity, MainActivity.class);
        activity.startActivity(intent);
    }
}
